package com.bw.lib_common.base

import androidx.lifecycle.ViewModel
import kotlinx.coroutines.channels.Channel

/**
 * @author ykj
 * @date 2025-10-16 20:38
 * @description
 */
abstract class BaseViewModel<I:IIntent>:ViewModel(),IViewModel<I> {
    val _intents = Channel<I>{Channel.UNLIMITED}//不设定限制
    override val intents:Channel<I>
        get() = _intents
    init {
        handleIntent()
    }
    //根据不同的意图处理
    abstract fun handleIntent()
}